import $ from 'jquery'
import ShoppingCart from './shoppingCart/shoppingCart'
import List from './list/list';

export default class App{
  constructor(id) {
    this.$el = $("#" + id)
  }
  // 初始化购物车
  initShopCart() {
    let shoppingCart = new ShoppingCart(this)
    shoppingCart.init()
  }
  // 初始化列表
  initList() {
    let list = new List(this)
    list.init()
  }
  init() {
    this.initShopCart()
    this.initList()
  }
}